﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;

namespace SalomonWebsite.UC
{
    public partial class MenuAbout : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dtNotes = Bll.Notes.MULTIPLE(Global.Connection);

                if (dtNotes.Rows.Count > 0)
                {
                    DataRow[] drs = dtNotes.Select(" [IsDisplay] = 1");
                    DataTable dt = dtNotes.Clone();

                    foreach (DataRow dr in drs)
                    {

                        dt.ImportRow(dr);

                    }

                    this.repAboutUs.DataSource = dt.DefaultView;
                    this.repAboutUs.DataBind();
                    dtNotes.Dispose();
                    dt.Dispose();
                }

                dtNotes.Dispose();
            }
            else
            {
                Response.Redirect("/Trace.aspx?Err=1");
            }
        }
    }
}